package br.uefs.dexa.rfframework.db.annotation;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class SimpleLineAnnotationFormatter implements AnnotationFormatter {

	@Override
	public String format(String textFilePath) 
	{
		String annotation = "";
		BufferedReader br;
		try {
			br = new BufferedReader(new FileReader(textFilePath));
			String line;
			
			while ((line = br.readLine()) != null) {
				annotation = annotation + line + "\n";
			}
			
			br.close();
			
		} catch (FileNotFoundException e) {
			e.printStackTrace();
			return null;
		} catch (IOException e) {
			e.printStackTrace();
		} 
		
		return annotation;
	}

}
